require 'artist'

class Client
	attr_accessor :name, :artists
	def initialize(name)
		@name = name
		@artists = Hash.new
	end

	def add_artist(a)
		@artists.push(a)
	end

	def parse(node)
		@name = node["name"]
		ints = node.find(node.path + '/interpreter')
		ints.each() do |n|
			puts n.to_s
			artist = Artist.new("")
			artist.parse(n)
			@artists[artist.name] = artist
		end
	end

	def print()
		puts "client" + @name + "\n"
		@artists.each() do |key, val|
			val.print()
		end
	end
end
